package com.room.search.service.dto;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * By   : ghd.bright
 * Time : 2022/3/27
 * Description: 搜索的参数前端传入
 */
public class SearchDataDTO {

    @NotNull
    private Area area;

    @NotNull
    private String roomType;
    private List<String> price;
    private List<String> roomStyle;
    private List<String> buildSize;
    private List<String> towards;
    private List<String> floor;
    private List<String> floorAge;
    private List<String> fitment;
    private List<String> roomUse;

    private Integer pageNum;
    private Integer pageSize;

    public Integer getPageNum() {
        return pageNum;
    }

    public SearchDataDTO setPageNum(Integer pageNum) {
        this.pageNum = pageNum - 1;
        return this;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public SearchDataDTO setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        return this;
    }

    public Area getArea() {
        return area;
    }

    public SearchDataDTO setArea(Area area) {
        this.area = area;
        return this;
    }

    public String getRoomType() {
        return roomType;
    }

    public SearchDataDTO setRoomType(String roomType) {
        this.roomType = roomType;
        return this;
    }

    public List<String> getPrice() {
        return price;
    }

    public SearchDataDTO setPrice(List<String> price) {
        this.price = price;
        return this;
    }

    public List<String> getRoomStyle() {
        return roomStyle;
    }

    public SearchDataDTO setRoomStyle(List<String> roomStyle) {
        this.roomStyle = roomStyle;
        return this;
    }

    public List<String> getBuildSize() {
        return buildSize;
    }

    public SearchDataDTO setBuildSize(List<String> buildSize) {
        this.buildSize = buildSize;
        return this;
    }

    public List<String> getTowards() {
        return towards;
    }

    public SearchDataDTO setTowards(List<String> towards) {
        this.towards = towards;
        return this;
    }

    public List<String> getFloor() {
        return floor;
    }

    public SearchDataDTO setFloor(List<String> floor) {
        this.floor = floor;
        return this;
    }

    public List<String> getFloorAge() {
        return floorAge;
    }

    public SearchDataDTO setFloorAge(List<String> floorAge) {
        this.floorAge = floorAge;
        return this;
    }

    public List<String> getFitment() {
        return fitment;
    }

    public SearchDataDTO setFitment(List<String> fitment) {
        this.fitment = fitment;
        return this;
    }

    public List<String> getRoomUse() {
        return roomUse;
    }

    public SearchDataDTO setRoomUse(List<String> roomUse) {
        this.roomUse = roomUse;
        return this;
    }

    @Override
    public String toString() {
        return "SearchDataDTO{" +
            "price=" + price +
            ", roomStyle=" + roomStyle +
            ", buildSize=" + buildSize +
            ", towards=" + towards +
            ", floor=" + floor +
            ", floorAge=" + floorAge +
            ", fitment=" + fitment +
            ", roomUse=" + roomUse +
            '}';
    }

    public static class Area {
        private String city;
        private String district;

        public String getCity() {
            return city;
        }

        public Area setCity(String city) {
            this.city = city;
            return this;
        }

        public String getDistrict() {
            return district;
        }

        public Area setDistrict(String district) {
            this.district = district;
            return this;
        }
    }
}
